import Vue from 'vue'
import Vuex from 'vuex'
import actions from './actions.js'
import mutations from './mutations.js'
import modules from './modules'

Vue.use(Vuex)
// 这里为全局的，模块内的请在模块内动态注册
const store = new Vuex.Store({
    strict: true,
    modules,
    state: {
        runElectron: !!window.runElectron,
        networkInterfaces: window.networkInterfaces || '', // 网络状态
        isFullScreen: false,
        keepAliveList: []
    },
    getters: {
        isLogined (state) {
            return !!state
        }
    },
    mutations,
    actions
})
export default store
